FMallocReleaser Class Reference

Class definition for objects that help guarding against memory leaks. More...

#include <fcleanup.h>

Public Member Functions

 FMallocReleaser (void *_data)
 Constructor. _data is the pointer to the memory on which free is to be called when this FMallocReleaser object's destructor is executed.
 ~FMallocReleaser ()
 Destructor. Calls the free function on the at construction time passed pointer.

Protected Attributes

void * data
 Remembers the pointer on which free is to be called during destruction.

Detailed Description

Class definition for objects that help guarding against memory leaks.

A stack allocated object of this type autonomically frees the "malloced" memory behind an at construction time passed pointer when it reaches the end of its scope.


Constructor & Destructor Documentation

FMallocReleaser ( void *  _data  )  [inline]

Constructor. _data is the pointer to the memory on which free is to be called when this FMallocReleaser object's destructor is executed.

~FMallocReleaser (  )  [inline]

Destructor. Calls the free function on the at construction time passed pointer.


Field Documentation

void* data [protected]

Remembers the pointer on which free is to be called during destruction.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Empty

Copyright ©2013 Steinberg Media Technologies GmbH. All Rights Reserved.